//获取应用实例
var app = getApp();
Page({
    data: {

    },
	promptWords(text) {
		wx.showModal({
			title: '下载邮证app',
			content: text,
			showCancel: false,
			success: function(res) {
				if (res.confirm) {
					// console.log('用户点击确定');
				} else if (res.cancel) {
					// console.log('用户点击取消');
				}
			}
		})
    },
    btnDownload(e) {
	    try {
		    let res = wx.getSystemInfoSync();
			if (res.model.indexOf('iPhone')>-1) {
				this.promptWords('请到AppStore中查找“邮证”下载安装');
			} else {
				this.promptWords('请到应用市场中查找“邮证”下载安装');
			}
	    } catch (e) {
		    // Do something when catch error
	    }
    }
});
